home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: AMOS Basic Source Code Archive
(archive/amosSrc).
You can browse this item here: MakeLib_example1.amos
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 41 4d 4f 53 20 42 61 73 | 69 63 20 76 31 33 34 20 |AMOS Bas|ic v134 |
|00000010| 00 00 07 38 04 01 06 52 | 00 00 00 00 17 01 06 52 |...8...R|.......R|
|00000020| 00 26 20 20 4d 61 6b 65 | 5f 4c 69 62 20 45 78 61 |.& Make|_Lib Exa|
|00000030| 6d 70 6c 65 20 31 2c 20 | 73 68 6f 77 69 6e 67 20 |mple 1, |showing |
|00000040| 75 73 65 20 6f 66 3a 20 | 00 00 04 01 06 52 00 00 |use of: |.....R..|
|00000050| 00 00 24 01 06 52 00 40 | 20 20 6d 61 20 4d 61 6c |..$..R.@| ma Mal|
|00000060| 6c 6f 63 2c 20 6d 61 20 | 46 72 65 65 20 41 6c 6c |loc, ma |Free All|
|00000070| 2c 20 6d 61 20 41 64 64 | 48 65 61 64 2c 20 6d 61 |, ma Add|Head, ma|
|00000080| 20 4e 65 78 74 2c 20 6d | 61 20 50 72 65 76 2c 20 | Next, m|a Prev, |
|00000090| 6d 61 20 46 69 72 73 74 | 00 00 0b 01 06 52 00 0e |ma First|.....R..|
|000000a0| 20 20 61 6e 64 20 6d 61 | 20 4c 61 73 74 20 00 00 | and ma| Last ..|
|000000b0| 04 01 06 52 00 00 00 00 | 04 01 06 52 00 00 00 00 |...R....|...R....|
|000000c0| 02 00 00 00 0c 01 00 06 | 00 00 06 00 6e 6f 64 65 |........|....node|
|000000d0| 73 00 ff a2 00 3e 00 00 | 00 0e 00 00 02 00 00 00 |s....>..|........|
|000000e0| 09 01 06 52 00 0a 20 4d | 45 4d 5f 46 52 45 45 20 |...R.. M|EM_FREE |
|000000f0| 00 00 13 01 00 12 ff bc | 0c 80 6c 69 73 74 5f 63 |........|..list_c|
|00000100| 72 65 61 74 65 00 00 84 | 00 06 00 00 06 00 6e 6f |reate...|......no|
|00000110| 64 65 73 00 00 8c 00 00 | 0d 01 00 12 ff d0 0a 80 |des.....|........|
|00000120| 6c 69 73 74 5f 73 68 6f | 77 00 00 84 03 e2 00 8c |list_sho|w.......|
|00000130| 00 00 09 01 00 12 ff f2 | 08 80 63 6c 65 61 6e 5f |........|..clean_|
|00000140| 75 70 00 00 02 00 00 00 | 02 00 00 00 04 01 06 52 |up......|.......R|
|00000150| 00 00 00 00 27 01 06 52 | 00 46 20 20 43 6c 65 61 |....'..R|.F Clea|
|00000160| 6e 20 75 70 20 72 6f 75 | 74 69 6e 65 2c 20 66 72 |n up rou|tine, fr|
|00000170| 65 65 73 20 61 6c 6c 20 | 6d 61 6c 6c 6f 63 27 65 |ees all |malloc'e|
|00000180| 64 20 6d 65 6d 6f 72 79 | 20 77 69 74 68 20 6f 6e |d memory| with on|
|00000190| 65 20 6d 61 20 46 72 65 | 65 20 41 6c 6c 20 20 20 |e ma Fre|e All |
|000001a0| 00 00 09 01 06 52 00 0a | 20 20 63 6f 6d 6d 61 6e |.....R..| comman|
|000001b0| 64 20 00 00 04 01 06 52 | 00 00 00 00 02 00 00 00 |d .....R|........|
|000001c0| 0e 01 03 76 00 00 00 3c | 00 00 80 00 00 06 00 00 |...v...<|........|
|000001d0| 08 80 63 6c 65 61 6e 5f | 75 70 00 00 05 04 00 4e |..clean_|up.....N|
|000001e0| 11 00 00 d0 00 00 09 01 | 06 52 00 0a 20 20 4d 45 |........|.R.. ME|
|000001f0| 4d 5f 46 52 45 45 00 00 | 03 04 12 90 00 00 03 04 |M_FREE..|........|
|00000200| 06 70 00 00 03 01 03 90 | 00 00 02 00 00 00 04 01 |.p......|........|
|00000210| 06 52 00 00 00 00 1a 01 | 06 52 00 2c 20 20 53 68 |.R......|.R., Sh|
|00000220| 6f 77 73 20 63 75 72 72 | 65 6e 74 20 66 72 65 65 |ows curr|ent free|
|00000230| 20 6d 65 6d 6f 72 79 20 | 28 63 68 69 70 20 61 6e | memory |(chip an|
|00000240| 64 20 66 61 73 74 29 20 | 00 00 04 01 06 52 00 00 |d fast) |.....R..|
|00000250| 00 00 02 00 00 00 0e 01 | 03 76 00 00 00 46 00 00 |........|.v...F..|
|00000260| 80 00 00 06 00 00 08 80 | 6d 65 6d 5f 66 72 65 65 |........|mem_free|
|00000270| 00 00 19 04 04 76 00 26 | 00 06 43 48 49 50 3a 20 |.....v.&|..CHIP: |
|00000280| ff c0 05 98 00 74 21 7a | 00 7c ff c0 00 26 00 08 |.....t!z|.|...&..|
|00000290| 20 20 46 41 53 54 3a 20 | ff c0 05 98 00 74 21 8a | FAST: |.....t!.|
|000002a0| 00 7c 00 00 03 01 03 90 | 00 00 02 00 00 00 04 01 |.|......|........|
|000002b0| 06 52 00 00 00 00 0e 01 | 06 52 00 14 20 20 53 68 |.R......|.R.. Sh|
|000002c0| 6f 77 73 20 63 72 65 61 | 74 65 64 20 6c 69 73 74 |ows crea|ted list|
|000002d0| 00 00 04 01 06 52 00 00 | 00 00 02 00 00 00 16 01 |.....R..|........|
|000002e0| 03 76 00 00 01 b2 00 0c | 80 00 00 06 00 00 0a 80 |.v......|........|
|000002f0| 6c 69 73 74 5f 73 68 6f | 77 00 00 84 00 06 00 00 |list_sho|w.......|
|00000300| 04 00 6c 69 73 74 00 8c | 00 00 02 00 00 00 11 04 |..list..|........|
|00000310| 04 76 00 26 00 17 41 4c | 4c 20 4e 4f 44 45 53 20 |.v.&..AL|L NODES |
|00000320| 42 45 47 49 4e 20 2d 2d | 3e 20 45 4e 44 00 00 00 |BEGIN --|> END...|
|00000330| 02 00 00 00 12 04 00 06 | 00 06 04 00 6e 6f 64 65 |........|....node|
|00000340| ff a2 00 4e 11 01 00 fe | 00 74 00 06 00 00 04 00 |...N....|.t......|
|00000350| 6c 69 73 74 00 7c 00 00 | 02 00 00 00 09 04 02 68 |list.|..|.......h|
|00000360| 00 56 00 06 00 06 04 00 | 6e 6f 64 65 00 00 0f 07 |.V......|node....|
|00000370| 04 76 21 f2 00 74 00 06 | 00 06 04 00 6e 6f 64 65 |.v!..t..|....node|
|00000380| ff c0 00 3e 00 00 00 08 | 00 7c 00 00 12 07 00 06 |...>....|.|......|
|00000390| 00 06 04 00 6e 6f 64 65 | ff a2 00 4e 11 01 00 e2 |....node|...N....|
|000003a0| 00 74 00 06 00 06 04 00 | 6e 6f 64 65 00 7c 00 00 |.t......|node.|..|
|000003b0| 03 04 02 74 00 00 02 00 | 00 00 04 01 06 52 00 00 |...t....|.....R..|
|000003c0| 00 00 0f 01 06 52 00 16 | 20 20 41 6e 64 20 73 61 |.....R..| And sa|
|000003d0| 6d 65 20 62 61 63 6b 77 | 61 72 64 73 21 20 00 00 |me backw|ards! ..|
|000003e0| 04 01 06 52 00 00 00 00 | 02 00 00 00 11 04 04 76 |...R....|.......v|
|000003f0| 00 26 00 17 41 4c 4c 20 | 4e 4f 44 45 53 20 45 4e |.&..ALL |NODES EN|
|00000400| 44 20 2d 2d 3e 20 42 45 | 47 49 4e 00 00 00 02 00 |D --> BE|GIN.....|
|00000410| 00 00 12 04 00 06 00 06 | 04 00 6e 6f 64 65 ff a2 |........|..node..|
|00000420| 00 4e 11 01 01 0e 00 74 | 00 06 00 00 04 00 6c 69 |.N.....t|......li|
|00000430| 73 74 00 7c 00 00 02 00 | 00 00 09 04 02 68 00 56 |st.|....|.....h.V|
|00000440| 00 06 00 06 04 00 6e 6f | 64 65 00 00 0f 07 04 76 |......no|de.....v|
|00000450| 21 f2 00 74 00 06 00 06 | 04 00 6e 6f 64 65 ff c0 |!..t....|..node..|
|00000460| 00 3e 00 00 00 08 00 7c | 00 00 12 07 00 06 00 06 |.>.....||........|
|00000470| 04 00 6e 6f 64 65 ff a2 | 00 4e 11 01 00 f0 00 74 |..node..|.N.....t|
|00000480| 00 06 00 06 04 00 6e 6f | 64 65 00 7c 00 00 03 04 |......no|de.|....|
|00000490| 02 74 00 00 02 00 00 00 | 03 01 03 90 00 00 02 00 |.t......|........|
|000004a0| 00 00 04 01 06 52 00 00 | 00 00 1d 01 06 52 00 32 |.....R..|.....R.2|
|000004b0| 20 20 43 72 65 61 74 65 | 73 20 6c 69 73 74 20 69 | Create|s list i|
|000004c0| 6e 63 6c 75 64 69 6e 67 | 20 4e 4f 44 45 53 20 6e |ncluding| NODES n|
|000004d0| 75 6d 62 65 72 20 6f 66 | 20 6e 6f 64 65 73 20 3a |umber of| nodes :|
|000004e0| 29 20 00 00 04 01 06 52 | 00 00 00 00 02 00 00 00 |) .....R|........|
|000004f0| 18 01 03 76 00 00 02 4e | 00 18 80 00 00 06 00 00 |...v...N|........|
|00000500| 0c 80 6c 69 73 74 5f 63 | 72 65 61 74 65 00 00 84 |..list_c|reate...|
|00000510| 00 06 00 00 06 00 6e 6f | 64 65 73 00 00 8c 00 00 |......no|des.....|
|00000520| 02 00 00 00 04 01 06 52 | 00 00 00 00 17 01 06 52 |.......R|.......R|
|00000530| 00 26 20 46 69 72 73 74 | 20 4d 61 6c 6c 6f 63 20 |.& First| Malloc |
|00000540| 6c 69 73 74 20 68 65 61 | 64 65 72 20 28 31 32 20 |list hea|der (12 |
|00000550| 62 79 74 65 73 21 29 20 | 00 00 04 01 06 52 00 00 |bytes!) |.....R..|
|00000560| 00 00 02 00 00 00 14 01 | 00 06 00 06 04 00 6c 69 |........|......li|
|00000570| 73 74 ff a2 00 4e 11 02 | 00 b0 00 74 00 3e 00 00 |st...N..|...t.>..|
|00000580| 00 0c 00 5c 00 3e 00 00 | 00 00 00 7c 00 00 1b 01 |...\.>..|...|....|
|00000590| 02 be 00 20 00 06 00 06 | 04 00 6c 69 73 74 02 c6 |... ....|..list..|
|000005a0| 00 4e 11 01 00 2e 00 06 | 00 06 04 00 6c 69 73 74 |.N......|....list|
|000005b0| 02 d0 00 0e 00 12 ff f2 | 08 80 63 6c 65 61 6e 5f |........|..clean_|
|000005c0| 75 70 00 00 02 00 00 00 | 04 01 06 52 00 00 00 00 |up......|...R....|
|000005d0| 28 01 06 52 00 48 20 54 | 68 65 6e 20 4d 61 6c 6c |(..R.H T|hen Mall|
|000005e0| 6f 63 20 61 6c 6c 20 6e | 6f 64 65 73 20 61 6e 64 |oc all n|odes and|
|000005f0| 20 61 64 64 20 74 68 65 | 6d 20 69 6e 74 6f 20 6c | add the|m into l|
|00000600| 69 73 74 20 28 4e 6f 64 | 65 20 68 65 61 64 65 72 |ist (Nod|e header|
|00000610| 20 3d 20 38 20 62 79 74 | 65 73 20 2b 20 32 00 00 | = 8 byt|es + 2..|
|00000620| 1c 01 06 52 00 30 20 62 | 79 74 65 73 20 66 6f 72 |...R.0 b|ytes for|
|00000630| 20 77 6f 72 64 20 63 6f | 6e 74 61 69 6e 69 6e 67 | word co|ntaining|
|00000640| 20 6e 75 6d 62 65 72 20 | 6f 66 20 6e 6f 64 65 20 | number |of node |
|00000650| 2e 2e 20 3a 29 20 00 00 | 04 01 06 52 00 00 00 00 |.. :) ..|...R....|
|00000660| 02 00 00 00 13 01 02 3c | 00 cc 00 06 00 0c 02 00 |.......<|........|
|00000670| 61 00 ff a2 00 3e 00 00 | 00 01 00 94 00 06 00 00 |a....>..|........|
|00000680| 06 00 6e 6f 64 65 73 00 | 00 00 18 04 00 06 00 12 |..nodes.|........|
|00000690| 04 00 6e 6f 64 65 ff a2 | 00 4e 11 02 00 b0 00 74 |..node..|.N.....t|
|000006a0| 00 3e 00 00 00 08 ff c0 | 00 3e 00 00 00 02 00 5c |.>......|.>.....\|
|000006b0| 00 3e 00 00 00 00 00 7c | 00 00 09 04 02 be 00 54 |.>.....||.......T|
|000006c0| 00 06 00 12 04 00 6e 6f | 64 65 00 00 11 07 01 5a |......no|de.....Z|
|000006d0| 00 06 00 12 04 00 6e 6f | 64 65 ff c0 00 3e 00 00 |......no|de...>..|
|000006e0| 00 08 00 5c 00 06 00 0c | 02 00 61 00 00 00 10 07 |...\....|..a.....|
|000006f0| 00 4e 11 02 00 64 00 06 | 00 06 04 00 6c 69 73 74 |.N...d..|....list|
|00000700| 00 5c 00 06 00 12 04 00 | 6e 6f 64 65 00 00 04 04 |.\......|node....|
|00000710| 02 d0 00 1c 00 00 09 07 | 00 12 ff f2 08 80 63 6c |........|......cl|
|00000720| 65 61 6e 5f 75 70 00 00 | 03 04 02 da 00 00 03 01 |ean_up..|........|
|00000730| 02 46 00 00 02 00 00 00 | 0a 01 03 90 00 84 00 06 |.F......|........|
|00000740| 00 06 04 00 6c 69 73 74 | 00 8c 00 00 41 6d 42 73 |....list|....AmBs|
|00000750| 00 00 | |.. | |
+--------+-------------------------+-------------------------+--------+--------+